<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>call改变this指向</title>
</head>

<body>
    <script>
        const student = {
            name: '张三'
        }

        function fn(x, y) {
            console.log(this); // student
            console.log(x + y); // 3
        }

        fn.call(student, 1, 2)
    </script>
</body>

</html>